package com.bootcamp.javase.oop.extend;

/**
 * @program: ExtendsCode
 * @description: create a cat and a dog
 * @author: Keyu Li
 * @create: 2021-08-31 20:32
 **/

public class Animal {
    String name;
    int age;
    String color;

    public void shout(){
        System.out.println("我会叫！");
    }
}

class Cat extends Animal{
    public void catchMouse(){
        System.out.println("可以捉老鼠！");
    }
}

class Dog extends Animal{
    public void keepDoor(){
        System.out.println("可以看门！");
    }
}
